import {createStore} from 'redux';

const store=createStore(function (state={
  user: {
    count: 0
  },
  company: {
    count: 0
  }
}, action){
  switch(action.type){
    case 'addUser':
      state.user.count++;
      return state;
    case 'addCompany':
      state.company.count++;
      return state;
    default:      //init、其他
      return state;
  }
});

export default store;
